import turtle
import time

__Pen = turtle.Pen()


def fractal(length, deepth):

    if (deepth <= 0):
        __Pen.forward(length)
    else:
        fractal(length/3, deepth - 1)
        __Pen.left(60)
        fractal(length/3, deepth - 1)
        __Pen.right(120)
        fractal(length/3, deepth - 1)
        __Pen.left(60)
        fractal(length/3, deepth - 1)

#开始进入Python的世界
fractal(300, 3)
time.sleep(1)
